import request from '@/utils/request.js'

export function getLogin(data) {
	return request.get('/anon/auth/login', data)
}
export function getCreateCode(phone, data) {
	return request.get(`/anon/auth/createCode/${phone}`, data)
}

export function getAuthRegister(data) {
	return request.get('/anon/auth/verify/code', data)
}
export function postBindList(data) {
	return request.post('/draw/account/list', data)
}

/**
 * 地址逆解析
 */
export function getMapLocation(data) {
	return request.get('/anon/index/map/location', data)
}

/**
 * 获取当前城市
 */
export function getAreaCityApi(data) {
	return request.get('/anon/index/area/city', data)
}

export function postBalance(data) {
	return request.post('/wallet/balance', data)
}
export function postWithdrawAdd(data) {
	return request.post('/wallet/withdraw', data)
}

export function postBindUpdate(data) {
	return request.post(`/bind/update/${data.id}`, data)
}

export function postLogList(data) {
	return request.post(`/wallet/log`, data)
}

/**
 * 艺人地址修改
 */
export function postUpdateAddressApi(data) {
	return request.post("/anon/artist/update/address", data)
}


export function postServiceStatus(data) {
	return request.post(`/anon/artist/update/service/status/${data}`)
}
export function postPartnerUpdate(data) {
	return request.post(`/anon/index/partner/update`, data)
}


/**
 * 上传头像
 */
export function postHeadUpload(data) {
	return request.post(`/user/head/upload`, data)
}
export function postSyncUserAndArtist(data) {
	return request.post(`/user/syncUserAndArtist`, data)
}
export function getDetectAuth(data) {
	return request.get(`/user/detectAuth`, data)
}

/**
 * 查询用户实名信息
 */
export function getDetectInfoEnhanced(data) {
	return request.get(`/user/getDetectInfoEnhanced`, data)
}

export function getShareUrl() {
	return request.get(`/user/shareUrl`)
}
export function getContactMeApi() {
	return request.get(`/anon/index/contactMe`)
}


/**
 * @param {Object} data
 * 地区下拉列表查询
 */
export function getIndexArea(data) {
	return request.get(`/anon/index/area/${data}`)
}




/**
 * 用户信息更新
 */
export function setUserUpdateApi(data) {
	return request.post(`/user/update`, data)
}

/**
 * base64文件上传
 */
export function setUploadBase64Api(data) {
	return request.post(`/user/upload/base64`, data)
}


/**
 * 文件上传
 */
export function setUserUploadApi(data) {
	return request.post(`/user/uploadImg`, data)
}

/**
 * 多文件上传
 */
export function setUserUploadPluralApi(data) {
	console.log('执行了吗', data);
	return request.post(`/user/uploads`, data)
}

/**
 * 艺人入驻
 */
export function setAnonArtistSettleApi(data) {
	return request.post(`/anon/artist/settle`,data)
}


/**
 * 手机号登录
 */
export function setAuthPhoneLoginApi(data) {
	return request.post(`/anon/auth/phoneLogin`,data)
}


